package net.dntuan.training.mvc.security;

import org.springframework.security.core.GrantedAuthority;

public enum Role implements GrantedAuthority {

    USER("ROLE_USER"), ADMIN("ROLE_ADMIN");

    private String name;

    private Role(String name) {
        this.name = name;
    }

    @Override
    public String getAuthority() {
        return this.name;
    }
}
